package com.guli.gulimall.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.guli.common.utils.PageUtils;
import com.guli.gulimall.member.entity.MemberEntity;
import com.guli.gulimall.member.exception.PhoneExistException;
import com.guli.gulimall.member.exception.UsernameExistException;
import com.guli.gulimall.member.vo.MemberLoginVo;
import com.guli.gulimall.member.vo.MemberRegistVo;
import com.guli.gulimall.member.vo.SocialUser;

import java.util.Map;

/**
 * 会员
 *
 * @author kyu
 * @email yukang_it@163.com
 * @date 2021-06-11 23:11:34
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void regist(MemberRegistVo memberRegistVo);

    void checkPhoneUnique(String phone) throws PhoneExistException;

    void checkUsernameUnique(String userName) throws UsernameExistException;
    /**
     * 普通登录
     */
    MemberEntity login(MemberLoginVo loginVo);
    /**
     * 社交帐号登录
     */
    MemberEntity login(SocialUser socialUser);

}

